package com.harassment.interception.data.databases;

import android.app.Application;
import android.arch.persistence.room.Room;

import com.harassment.interception.base.HIApplication;
import com.harassment.interception.data.databases.dao.BlackListDao;
import com.harassment.interception.data.databases.dao.InterceptedPhoneDao;
import com.harassment.interception.data.databases.dao.InterceptedSmsDao;
import com.harassment.interception.data.databases.dao.WhiteListDao;

public class HIDBUtil {
    private static HIDatabase sHIDatabase;
    private static final HIDBUtil HIDB_UTIL = new HIDBUtil();

    private HIDBUtil() {
        sHIDatabase = Room.databaseBuilder(HIApplication.getContext(), HIDatabase.class, HIDatabase.DATABASE_NAME).allowMainThreadQueries().build();
    }

    public static HIDatabase getHIDatabase() {
        return sHIDatabase;
    }

    public static BlackListDao getBlackListDao() {
        return sHIDatabase.getBlackListDao();
    }

    public static WhiteListDao getWhiteListDao() {
        return sHIDatabase.getWhiteListDao();
    }

    public static InterceptedPhoneDao getInterceptedPhoneDao() {
        return sHIDatabase.getInterceptedPhoneDao();
    }

    public static InterceptedSmsDao getInterceptedSmsDao() {
        return sHIDatabase.getInterceptedSmsDao();
    }

}
